<?php echo $this->render('header.phtml'); ?> 
<link type="text/css" rel="stylesheet" href="/public/js_calendar/dhtmlgoodies_calendar.css" media="screen"></LINK>
<script type="text/javascript" src="/public/js_calendar/dhtmlgoodies_calendar.js"></script>
<h2>По учителю</h2>
<form>
<table border="0" cellpadding="3">
<tr>

<td> C </td> <td> <input type="text" size="10" id="from_date" name="from_date" value="<?php echo $this->escape(trim($this->item->from_date));?>"> </td>
<td width="70"> <img id="today_trigger" src="/public/images/cal.gif" style="padding:6px;" onclick="displayCalendar(document.getElementById('from_date'),'yyyy-mm-dd',this);"> </td>


<td> По </td> <td> <input type="text" size="10" id="to_date" name="to_date" value="<?php echo $this->escape(trim($this->item->to_date));?>"> </td>
<td width="70"> <img id="today_trigger" src="/public/images/cal.gif" style="padding:6px;" onclick="displayCalendar(document.getElementById('to_date'),'yyyy-mm-dd',this);"> </td>

<td> Преподаватель </td> <td colspan="2">
<select id="teacher_id" name="teacher_id" size="1"  style="width:250px;">
    <option value="">Все</option>
    <?php foreach($this->teacher_ids as $teacher) { ?> 
    <option value="<?php echo $teacher->id;?>" 
    <?php echo $this->escape(trim($this->item->teacher_id))==$teacher->id?' selected ':'';?>>
    <?php echo $teacher->first_name.' '.$teacher->last_name ;?></option>
    <?php } ?>
</select>
</td>
<td>
<a href="javascript:document.forms[0].submit();" class="bt_blue"><span class="bt_blue_lft"></span><strong>Искать</strong><span class="bt_blue_r"></span></a>
</td></tr>
</table>
</form>

Количество занятий : <?php echo $this->quantity;?><input type="hidden" id="quantity" value="<?php echo (FLOAT)$this->quantity;?>"><br/> 
Количество часов : <?php echo $this->hours;?><input type="hidden" id="hours" value="<?php echo (FLOAT)$this->hours;?>"><br/> 
Цена : <input type="text" id="price"><input type="button" onclick="Calculate()" value="Посчитать"><br>
ЗП : <font id="zp"></font>

<script type="text/javascript">
function Calculate() {
    document.getElementById('zp').innerHTML = parseFloat(document.getElementById('hours').value) * parseFloat(document.getElementById('price').value);
}
</script>
<?php echo $this->render('footer.phtml'); ?>